﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AddUser.aspx.cs" Inherits="BasicInfo_AddUser" %>

<!DOCTYPE html> 
<html> 
	<head runat="server"> 
        <meta charset="utf-8">
	    <meta name="viewport" content="width=device-width, initial-scale=1">
	    <title>延安联通数据中心</title> 
        <link href="../Content/jquery.mobile-1.2.0.min.css" rel="stylesheet" type="text/css" />
        <script src="../Scripts/jquery-1.6.4.min.js" type="text/javascript"></script>
        <script src="../Scripts/jquery.mobile-1.2.0.min.js" type="text/javascript"></script>
        <script src="../Scripts/jquery.validate.min.js" type="text/javascript"></script>
        <link href="../Content/Default.css" rel="stylesheet" type="text/css" />
        <script type="text/javascript">
            $.mobile.ajaxEnabled = false;
            $(function () {
                $("#form1").validate({
                    rules: {
                        username: "required",
                        loginname: "required",
                        password: {
                            required: true,
                            minlength: 6
                        },
                        password2: {
                            required: true,
                            equalTo: '#password'
                        }
                    },
                    messages: {
                        username: "请输入姓名",
                        loginname: "请输入登录名",
                        password: {
                            required: "请输入密码",
                            minlength: "请确认密码不少于6个字符"
                        },
                        password2: {
                            required: "请再次输入密码",
                            equalTo: "两次输入的密码不一致"
                        }
                    }
                });
            });
        </script>
    </head> 
<body>     
    <!-- start page -->
    <div data-role="page">

	<!-- start header -->
	<div data-role="header" data-theme="c" data-position="inline" data-backbtn="false">
        <a href="../desktop.aspx" data-icon="home">桌面</a>
		<h1>UDC</h1>
        <a href="../default.aspx" data-icon="forward">退出</a>
	</div>
	<!-- end header -->

	<!-- start content -->
	<div data-role="content">	
        <form id="form1" runat="server" action="AddUser.aspx" method="post">  
        <ul data-role="listview" data-inset="true">
            <asp:Literal runat="server" ID="msg"></asp:Literal>
            <li data-role="fieldcontain">
	        	<label for="username">姓名:</label>
	        	<input type="text" name="username" id="username" value="" runat="server"/>
			</li>
            <li data-role="fieldcontain">
	        	<label for="loginname">登录名:</label>
	        	<input type="text" name="loginname" id="loginname" value="" runat="server"/>
			</li>
            <li data-role="fieldcontain">
	        	<label for="password">密码:</label>
                <asp:TextBox runat="server" ID="password" TextMode="Password" MaxLength=20></asp:TextBox>
			</li>
            <li data-role="fieldcontain">
	        	<label for="password2">再次输入:</label>
	        	<asp:TextBox runat="server" ID="password2" TextMode="Password" MaxLength=20></asp:TextBox>
			</li>
            <li data-role="fieldcontain">
	        	<fieldset data-role="controlgroup">
			    	<legend>所属部门:</legend>
                     <asp:RadioButtonList runat="server" ID="DepartList" RepeatLayout="Flow" RepeatDirection="Horizontal">
                     </asp:RadioButtonList>
			    </fieldset>
			</li>
            <li data-role="fieldcontain">
				 <fieldset data-role="controlgroup">
			    	<legend>角色:</legend>
                     <asp:RadioButtonList runat="server" ID="RoleList" RepeatLayout="Flow" RepeatDirection="Horizontal">
                     </asp:RadioButtonList>
			    </fieldset>
			</li>
            <li class="ui-body ui-body-b">
				<fieldset class="ui-grid-a">
						<div class="ui-block-a"><button type="reset" data-theme="c">重置</button></div>
						<div class="ui-block-b">
                            <asp:Button runat="server" Text="新增" ID="addUser" data-theme="c"
                                onclick="addUser_Click"/>
                        </div>
			    </fieldset>
			</li>
        </ul>
        </form>  
	</div>
	<!-- end content -->
	
    </div>
    <!-- end page -->
    
</body>
</html>
